This application relates generally to virtual memory interfaces, and more particularly to apparatus and methods for providing access to individual storage locations of buffers, which may be scattered in memory.
Data processing electronic devices typically include memory for storing data. A memory interface specifies a protocol that is used to access the individual data storage locations of a physical memory (e.g., a random access memory). These individual data storage locations are indexed by physical addresses in a physical address space. In some systems, a processor or user process operates with respect to virtual addresses (also referred to as “logical addresses”) in a virtual address space, where the virtual addresses must be translated into the corresponding physical addresses before the data storage locations of the physical memory can be accessed. In these systems, the translation of virtual addresses to physical addresses typically involves determining mappings between the virtual addresses and the physical addresses from lookup translation tables, which are stored in memory.
Data processing typically involves moving data from a source memory to a destination memory. A processor may perform such a data transfer by reading the data from the source memory and subsequently writing the data to the destination memory. Alternatively, a direct memory access (DMA) engine may be used to transfer the data directly from the source memory to the destination memory, without having to be routed through the processor or other intervening device.
In a basic mode of operation, the DMA engine transfers a single contiguous block of data from the source memory to the destination memory. In this mode of operation, the processor configures the DMA engine with the starting address in the source memory, and starting address in the destination memory, and the amount of data to be transferred. Based on this information, the DMA engine controls the transfer of the contiguous data from the source memory to the destination memory.
In scatter gather mode of operation, the DMA engine transfers data in accordance with the physical addresses of the source and destination memory locations specified by the processor. This mode of operation typically is used to transfer data between contiguous physical addresses of a first memory and noncontiguous physical addresses of a second memory. For example, the gather function typically involves transferring noncontiguous blocks of data in the source memory to a contiguous area in the destination memory, whereas the scatter function typically involves transferring contiguous blocks of data from the source memory into noncontiguous blocks in the destination memory. The physical addresses of the source and destination memory addresses typically are specified by the processor in the form of a scatter gather list of elements (also referred to as “vectors”), where each of the elements contains the physical memory address and the length of a respective segment in the overall data transfer.